import React, { Component } from 'react'

// 统一的数据源
import { Consumer } from '../context/store'

class Cmp2 extends Component {
  render() {
    return (
      <div>
        cmp2---得到数据
        <hr/>
        {/* 消费一下 */}
        <Consumer>
          {
            value=><h1>{value}</h1>
          }
        </Consumer>
      </div>
    );
  }
}

export default Cmp2;
